﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AG.Infrastructure.Utility
{
    public static class EnumHelper
    {
        /// <summary>
        /// why is foreach only defined on List?
        /// one of the greater mysteries
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <param name="action"></param>
        public static void ForEach<T>(this IEnumerable<T> t, Action<T> action)
        {
            foreach (var enumerable in t)
            {
                action(enumerable);
            }
        }

    }
}
